home *** CD-ROM | disk | FTP | other *** search
/ Aminet 20 / Aminet 20 (1997)(GTI - Schatztruhe)[!][Aug 1997].iso / Aminet / dev / src / DICE_SharedLib.lha / example.h < prev    next >
C/C++ Source or Header  |  1997-06-23  |  2KB  |  106 lines

  1. #ifndef _EXAMPLE_LIB_H
  2. //
  3. //        Example Shared Library Code
  4. //        Compiles with DICE
  5. //        
  6. //        By Wez Furlong <wez@twinklestar.demon.co.uk>
  7. //
  8. //        Based on code by Geert Uytterhoeven and Matt Dillon
  9. //
  10. //        This source was produced:    Monday 23-Jun-1997 
  11. //
  12. //        DISCLAIMER
  13. //
  14. //        Please read the code FULLY before use... I could have put ANYTHING in
  15. //        here; I may have the code format your bootdrive for example.
  16. //
  17. //        NEVER trust example code without fully understanding what it does.
  18. //
  19. //        This code comes with no warranty; I am NOT responsible for any damage
  20. //        that may ensue from its use, be it physical, mental or otherwise.
  21. //
  22. //        This code may be modified, so long as the names of myself, Geert and
  23. //        Matt are mentioned within any release or distribution produced using it,
  24. //        and a copy sent to myself.
  25. //
  26. //        This code may be redistributed freely; no profit is allowed to be made
  27. //        from its distribution.
  28. //
  29. //        This code may be included on an Aminet or Fred Fish CD.
  30. //
  31.  
  32. //---------        Main header file; include in all your library modules
  33.  
  34. //--    OS headers
  35.  
  36. #include <exec/types.h>
  37. #include <exec/exec.h>
  38. #include <exec/execbase.h>
  39. #include <exec/semaphores.h>
  40. #include <exec/alerts.h>
  41. #include <exec/memory.h>
  42. #include <exec/semaphores.h>
  43. #include <exec/initializers.h>
  44. #include <exec/execbase.h>
  45. #include <exec/nodes.h>
  46.  
  47. #include <dos/dos.h>
  48. #include <dos/dos.h>
  49. #include <dos/dostags.h>
  50. #include <dos/dosextens.h>
  51. #include <dos/stdio.h>
  52. #include <dos/rdargs.h>
  53. #include <dos/datetime.h>
  54.  
  55. #include <proto/exec.h>
  56. #include <proto/dos.h>
  57. #include <proto/utility.h>
  58.  
  59. #include <stdio.h>
  60. #include <stdlib.h>
  61. #include <string.h>
  62. #include <time.h>
  63. #include <lists.h>
  64. #include <string.h>
  65.  
  66. #include <utility/tagitem.h>
  67.  
  68. //---    Stuff
  69.  
  70. extern char LibName[];
  71. extern char LibIDString[];
  72. extern UWORD LibVersion;
  73. extern UWORD LibRevision;
  74.  
  75. //--    Private Library Base
  76.  
  77. struct LibraryBase {
  78.  
  79.     //-- ALWAYS have these..
  80.     
  81.     struct Library LibNode;
  82.     UBYTE Flags;
  83.     UBYTE Pad;
  84.     BPTR SegList;
  85.  
  86.     //-- Add your own stuff here
  87.  
  88. };
  89.  
  90. extern struct LibraryBase *LibraryBase;
  91.  
  92.  
  93. //--- Done
  94. #endif
  95.  
  96. //----- Automatic Prototyping
  97. //--    Note: all public library calls need to be declared as LibCalls
  98.  
  99. #ifndef Prototype
  100. #define Prototype extern
  101. #define Local static
  102. #define LibCall __geta4 __saveds
  103. #include "example-protos.h"
  104. #endif
  105.  
  106.